
{% extends 'blog/i/base.html' %}
{% load filter_tool %}


{% block content %}
            <div class="current_infor" >
                 <h3>{{ current_user.nickname }}的日记</h3><span>（全部{{ total_count }}篇）</span>
            </div>

    			<div class="blog" >
                    <div class="list" >
                        <ul>
                            {% for article in articles %}
                               <li class="item" >

                                <div class="title" >
                                    <a href="{{ current_user_url }}/blog/{{ article.id }}" >{{ article.title }}</a> 
                                </div>

                            <div class="au" >
                                <a href="/people/{{ current_user_url }}">{{ current_user.nickname }}</a>
                                 <span class="time" >
                                    {{ article.create_time|date:'Y-m-d H:i' }}
                                </span>
                            </div>

                                {% autoescape off %}

                                <div class="content" >
                                    {{ article.content|cutwords_html:150 }}
                                </div>

                                 <a class="viewall" href="{{ current_user_url }}/blog/{{ article.id }}">查看全文</a>

                                {% endautoescape%}
                            </li> 
                                
                            {% endfor %}
                        </ul>
                        </div>


                       <div class="page" >


                            {% if page.prev_page_number and not less_than_certain_size %}
                           <a href="{{ current_user_url }}/blog?page={{ page.prev_page_number }}" class="prev"> <<-上一页</a>
                           {% endif %}

                             {% for key,value in pages %}

                                {% ifequal page.page_number key %}

                                    <a href="{{ current_user_url }}/blog?page={{ key }}" style='color:#105CB6;font-weight:bolder;border-color:#fff' >  {{ value.page_number }}  </a>

                                {% else %}

                                        <a href="{{ current_user_url }}/blog?page={{ key }}" >  {{ value.page_number }}  </a>

                                {% endifequal %}

                             {% endfor %}

                           
                            
                         {% if page.has_next  and not less_than_certain_size %}
                             <a href="{{ current_user_url }}/blog?page={{ page.next_page_number }}" class="next" >下一页->></a>
                         {% endif %}
                          </div>
                </div>

            
{% endblock %}

